/** 分页查询时，后台返回的数据中分页参数的命名，返回示例：
 *
 * {
 *
 * "msg":"ok",
 * "code":1,
 * "succ":true,
 * "oper":"default",
 * "page":{
 *          "current":1,
 *          "pages":2,
 *          "records":[],
 *          "size":3,
 *          "total":5
 *        }
 * }
 * */
export const autoSaveInterval=300000

export const pageParamNames = ["current","pages","size","total"]

export const userTypes = [
  {id:0, name:'管理员', key:'admin',disabled:true},
  {id:1, name:'集团用户', key:'group',disabled:false},
  {id:2, name:'站长', key:'webmaster',disabled:false},
  {id:3, name:'普通用户', key:'instation',disabled:false}
]

export const permType = {
  MENU: 1,
  BUTTON: 2,
  API: 3,
}

export const approvalSteps={
  init:1,
  disagree:1,
  check:2,
  agree:3
}

export const LOGINITEMS = {
  RPTUNAME:'report_username',
  USERNAME:'username',
  PASSWORD:'password'
}

export const tenantType = {
  TENANT:1,
  COMPANY:2,
  DEPARTENT:3
}
export const OrgnizeType={
  ANCESTOR:'ancestor',
  AREA:'area',
  FACTORY:'factory',
  DEPARTMENT:'department'
}
export const menuType = {
  TOP:'top',
  MENU:'root',
  ITEM:'menu',
  BUTTON:'button'
}

export const buttonType={
  ADD:'添加',
  UPDATE:'更新',
  DELETE:'删除'
}

export const devFieldType={
  TEXT:'text',
  RADIO:'radio',
  SELECT:'select',
  DATE:'date'
}

export const formMonths=[
  {
    text:'一月',
    value:'1'
  },
  {
    text:'二月',
    value:'2'
  },
  {
    text:'三月',
    value:'3'
  },
  {
    text:'四月',
    value:'4'
  },
  {
    text:'五月',
    value:'5'
  },
  {
    text:'六月',
    value:'6'
  },
  {
    text:'七月',
    value:'7'
  },
  {
    text:'八月',
    value:'8'
  },
  {
    text:'九月',
    value:'9'
  },
  {
    text:'十月',
    value:'10'
  },
  {
    text:'十一月',
    value:'11'
  },
  {
    text:'十二月',
    value:'12'
  }
]

export const messureList=[
  {
    value:'℃',
    label:'℃'
  },
  {
    value:'MPa',
    label:'MPa'
  },
  {
    value:'KPa',
    label:'KPa'
  },
  {
    value:'mm',
    label:'mm'
  },
  {
    value:'KWH',
    label:'KWH'
  },
  {
    value:'t/h',
    label:'t/h'
  },
  {
    value:'t',
    label:'t'
  },
  {
    value:'VOL%',
    label:'VOL%'
  },
  {
    value:'l/h',
    label:'l/h'
  },
  {
    value:'kg',
    label:'kg'
  },
  {
    value:'RPM',
    label:'RPM'
  },
  {
    value:'mg/m³',
    label:'mg/m³'
  },
  {
    value:'Pa',
    label:'Pa'
  },
  {
    value:'%',
    label:'%'
  },
  {
    value:'m³/h',
    label:'m³/h'
  },
  {
    value:'mg/L',
    label:'mg/L'
  },
  {
    value:'次',
    label:'次'
  },
  {
    value:'h',
    label:'h'
  },
  {
    value:'MW',
    label:'MW'
  },
  {
    value:'kg/kW.h',
    label:'kg/kW.h'
  }
]

export const reportType = {
  'electricity':2,
  'food':1
}


/**
 * 下拉选择框数据：权限类型
 *
 */
export const permTypeOptions = [
  {value: permType.MENU, label: '菜单'},
  {value: permType.BUTTON, label: '按钮'},
  {value: permType.API, label: '接口'}
]

/**
 * 权限类型
 * @type {Map<any, any>}
 */
export const permTypeMap = new Map([
  [permType.MENU,'菜单'],
  [permType.BUTTON,'按钮'],
  [permType.API,'测试']
])

export const confirm = { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning'}

export const root = {
  rval: 'root',
  pval: '*'
}
